package cn.hz.pi.api.util;


public class TagValue implements Cloneable,Comparable<TagValue>{

	private int id;
	private String name;
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	private String time;
	private Float value;
	private int state;//0有效1：无效
	
	public TagValue(){}
	
	public TagValue(int id,String time, Float value, int state) {
		super();
		this.id = id;
		this.time = time;
		this.value = value;
		this.state = state;
	}

	@Override
	public String toString() {
		return "TagValue [id=" + id + ", time=" + time + ", value=" + value + ", state=" + state + "]";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public Float getValue() {
		return value;
	}
	public void setValue(Float value) {
		this.value = value;
	}
	public int getState() {
		return state;
	}
	public void setState(int status) {
		this.state = status;
	}
	
	@Override
	public TagValue clone() throws CloneNotSupportedException {
		// TODO Auto-generated method stub
		return (TagValue)super.clone();
	}

	@Override
	public int compareTo(TagValue o) {
		return this.getTime().compareTo(o.getTime());
	}

}
